/***************************************************************************
 *   Copyright (C) 2008 by Eduardo Gurgel Pinho                            *
 *   edgurgel@gmail.com                                                    *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 3 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
***************************************************************************/

#ifndef __SCENE_PANEL_H__
#define __SCENE_PANEL_H__

#include "scene_tree.h"
#include "common/scene.h"
#include "object/object.h"
#include "light/light.h"

#include <QWidget>

class QMenu;
class QPushButton;

namespace Ui {

class Scene_Panel : public QWidget {

Q_OBJECT

public:
	Scene_Panel(QWidget*,Scene_Tree*,Sirat::Common::Scene*);
	~Scene_Panel(void);
	
	QSize minimumSizeHint() const;
	
	Sirat::Common::Scene* get_scene(void) const;
	void set_scene(Sirat::Common::Scene*);
	
public slots:
	
	void select_object(Sirat::Object::Object*,int);
	
private slots:
	void add_sphere(void);
	void add_plane(void);
	void add_cone(void);
	void add_cylinder(void);
	void add_disc(void);
	void add_triangle(void);
	void add_quadrilateral(void);
	void remove_object(void);
	
	void add_punctual_light(void);
	void add_square_light(void);

signals:
	void scene_updated(void);
	
private:
	QMenu* create_object_menu(void);
	QMenu* create_light_menu(void);
	
	Scene_Tree* scene_tree;
	QPushButton* add_object_button;
	QPushButton* add_light_button;
	QPushButton* remove_object_button;
	
	Sirat::Common::Scene* scene;
	Sirat::Object::Object* selected_object;
	int id_selected_object;
	
};

}

#endif
